type conversion - definição. O que é type conversion. Significado, conceito
Diclib.com
Dicionário ChatGPT
Digite uma palavra ou frase em qualquer idioma 👆
Idioma:

Tradução e análise de palavras por inteligência artificial ChatGPT

Nesta página você pode obter uma análise detalhada de uma palavra ou frase, produzida usando a melhor tecnologia de inteligência artificial até o momento:

  • como a palavra é usada
  • frequência de uso
  • é usado com mais frequência na fala oral ou escrita
  • opções de tradução de palavras
  • exemplos de uso (várias frases com tradução)
  • etimologia

O que (quem) é type conversion - definição

CHANGING AN EXPRESSION FROM ONE DATA TYPE TO ANOTHER
Explicit type conversion; Typecasting (programming); Typecast (programming); Cast (computer science); Type conversions; Implicit coercion; Cast (computer programming); Implicit type conversion; Type coercion; Const cast; Implicit conversion; Upcasting; Type promotion; Type Conversion; Typecasting (hacking); Typecasting (computing); Type casting (computer programming); Typecasting (computer programming); Typecasting (computer science); Type casting (computer science); Type casting (computing); Cast (computing); Casting (computing); Casting (computer programming); Casting (computer science); Integer promotion; Type juggling; Implicit type casting; Explicit type casting

implicit type conversion         
<programming> (Or "coercion") The abilty of some compilers to automatically insert type conversion functions where an expression of one type is used in a context where another type is expected. A common example is coercion of integers to reals so that an expression like sin(1) is compiled as sin(integerToReal(1)) where sin is of type Real -> Real. A coercion is usually performed automatically by the compiler whereas a cast is an explicit type conversion inserted by the programmer. See also subtype. (1997-07-28)
explicit type conversion         
<programming> (Or "cast" in C and elsewhere). A programming construct (syntax) to specify that an expression's value should be converted to a different type. For example, in C, to convert an integer (usually 32 bits) to a char (usually 8 bits) we might write: int i = 42; char *p = &buf; *p = (char) i; The expression "(char)" (called a "cast") converts i's value to char type. Casts (including this one) are often not strictly necessary, due to automatic coercions performed by the compiler, but can be used to make the conversion obvious and to avoid warning messages. (1999-09-19)
Data conversion         
CONVERSION OF DIGITAL DATA BETWEEN FORMATS
File conversion; File converter; Document conversion; Online conversion; File format converter; Document converter; File format conversion; Format conversion; File type conversion; Pivotal conversion; Conversion between file formats
Data conversion is the conversion of computer data from one format to another. Throughout a computer environment, data is encoded in a variety of ways.

Wikipédia

Type conversion

In computer science, type conversion, type casting, type coercion, and type juggling are different ways of changing an expression from one data type to another. An example would be the conversion of an integer value into a floating point value or its textual representation as a string, and vice versa. Type conversions can take advantage of certain features of type hierarchies or data representations. Two important aspects of a type conversion are whether it happens implicitly (automatically) or explicitly, and whether the underlying data representation is converted from one representation into another, or a given representation is merely reinterpreted as the representation of another data type. In general, both primitive and compound data types can be converted.

Each programming language has its own rules on how types can be converted. Languages with strong typing typically do little implicit conversion and discourage the reinterpretation of representations, while languages with weak typing perform many implicit conversions between data types. Weak typing language often allow forcing the compiler to arbitrarily interpret a data item as having different representations—this can be a non-obvious programming error, or a technical method to directly deal with underlying hardware.

In most languages, the word coercion is used to denote an implicit conversion, either during compilation or during run time. For example, in an expression mixing integer and floating point numbers (like 5 + 0.1), the compiler will automatically convert integer representation into floating point representation so fractions are not lost. Explicit type conversions are either indicated by writing additional code (e.g. adding type identifiers or calling built-in routines) or by coding conversion routines for the compiler to use when it otherwise would halt with a type mismatch.

In most ALGOL-like languages, such as Pascal, Modula-2, Ada and Delphi, conversion and casting are distinctly different concepts. In these languages, conversion refers to either implicitly or explicitly changing a value from one data type storage format to another, e.g. a 16-bit integer to a 32-bit integer. The storage needs may change as a result of the conversion, including a possible loss of precision or truncation. The word cast, on the other hand, refers to explicitly changing the interpretation of the bit pattern representing a value from one type to another. For example, 32 contiguous bits may be treated as an array of 32 booleans, a 4-byte string, an unsigned 32-bit integer or an IEEE single precision floating point value. Because the stored bits are never changed, the programmer must know low level details such as representation format, byte order, and alignment needs, to meaningfully cast.

In the C family of languages and ALGOL 68, the word cast typically refers to an explicit type conversion (as opposed to an implicit conversion), causing some ambiguity about whether this is a re-interpretation of a bit-pattern or a real data representation conversion. More important is the multitude of ways and rules that apply to what data type (or class) is located by a pointer and how a pointer may be adjusted by the compiler in cases like object (class) inheritance.